
<%@ page import="br.edu.ufam.avaliacao.Avaliacao" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'avaliacao.label', default: 'Avaliacao')}" />
        <title><g:message code="default.list.label" args="[entityName]" /></title>
    </head>
    <body>

        <div class="body"  style="width: 1000px">
            <h1><g:message code="Lista de Avaliações Concluídas" /></h1>
            <g:if test="${flash.message}">
                <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr>
                            <g:sortableColumn property="curso.nomeCursoDiploma" title="${message(code: 'avaliacao.curso.nomeCursoDiploma.label', default: 'Curso')}" />

                            <g:sortableColumn property="descricao" title="${message(code: 'avaliacao.descricao.label', default: 'Descrição')}" />                            

                            <g:sortableColumn property="conceitoFinal" title="${message(code: 'avaliacao.conceitoFinal.label', default: 'Conceito Final')}" />

                            <g:sortableColumn property="dateStart" title="${message(code: 'avaliacao.dateStart.label', default: 'Data Início')}" />

                            <g:sortableColumn property="dateEnd" title="${message(code: 'avaliacao.dateEnd.label', default: 'Data Fim')}" />
                            
                            <g:sortableColumn property="status" title="${message(code: 'avaliacao.status.label', default: 'Finalizada')}" />
                        </tr>
                    </thead>
                    <tbody>
                        <g:each in="${avaliacaoInstanceList}" status="i" var="avaliacaoInstance">
                            <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                                <td><g:link controller="finalizada" action="show" id="${avaliacaoInstance.id}">${fieldValue(bean: avaliacaoInstance, field: "curso.nomeCursoDiploma")}</g:link></td>

                                <td><g:link controller="finalizada" action="show" id="${avaliacaoInstance.id}">${fieldValue(bean: avaliacaoInstance, field: "descricao")}</g:link></td>                                

                                <td><g:link controller="finalizada" action="show" id="${avaliacaoInstance.id}">${fieldValue(bean: avaliacaoInstance, field: "conceitoFinal")}</g:link></td>

                                <td><g:link controller="finalizada" action="show" id="${avaliacaoInstance.id}">${avaliacaoInstance.dateStart.format("dd/MM/yyyy")}</g:link></td>

                                <td><g:link controller="finalizada" action="show" id="${avaliacaoInstance.id}">${avaliacaoInstance.dateEnd.format("dd/MM/yyyy")}</g:link></td>
                                
                                <td><g:link action="show" id="${avaliacaoInstance.id}"><img src="../images/skin/finalizado_3.png" width="24" height="24"></g:link></td>
                                </tr>
                        </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${avaliacaoInstanceTotal}" />
            </div>
        </div>
    </body>
</html>
